@import '@/styles/utils.scss';



.preview{

  width: 0%;
  height: 100%;
  background: #FFFFFF;
  box-shadow: 0px 0px 40px 0px #EBEBEB;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s;

  :global(.dark) & {
      background: #18181B;
      box-shadow:none;
      border:1px solid #3F3F46
  }


  .code{
    position: relative;
    flex: 1;
    .codeCont{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
    }
  }

}

.previewOpen{
  width: 50%;
  transition: all 0.3s;
  animation: expand 0.3s ease forwards;
}

@keyframes expand {
  to {
      width: 100%;
  }
}


.footer {
  display: flex;
  justify-content: flex-end;
  padding: 8px;
  border-top: 1px solid var(--border-color);
  padding: 24px;
  background: #ffffff;
  box-shadow: 0px 0px 40px 0px #ebebeb;
  border-radius: 0px 0px 16px 16px;
  display: flex;
  justify-content: space-between;

  :global(.dark) & {
    background: transparent;
    box-shadow: none;
    border-top: 1px solid #3f3f46;
  }

  .switch {
    width: 90px;
    height: 32px;
    background: #EAEDF0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 2px;
    position: relative;
    cursor: pointer;

    :global(.dark) & {
      background: #27272A;
    }
    
    .switchItem {
      width: 43px;
      height: 28px;
      border-radius: 4px;
    }
    
    .slider {
      position: absolute;
      width: 43px;
      height: 28px;
      background: #fff;
      border-radius: 4px;
      transition: all 0.3s;
      box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 500;
      color: #000;
      
      &.right {
        transform: translateX(43px);
      }

      &.active {
        background: #000;
        color: #fff;
      }

      :global(.dark) & {
        background: #3F3F46;
        color: #fff;
        box-shadow: none;

        &.active {
          background: #fff;
          color: #000;
        }
      }
    }
  }

  .right {
    display: flex;
    align-items: center;
  }
}

.button1 {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #000000;
  color: #000;
  padding: 6px 0px;
  min-width: 120px;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }

  .buttonIcon {
    color: #000;
  }

  :global(.dark) & {
    color: #fff;
    border: 1px solid #fff;

    .buttonIcon {
      color: #fff;
    }
  }
}
